<%@ page import="java.sql.Connection" %>
<%@ page import="java.sql.Statement" %>
<%@ page import="java.sql.ResultSet" %>
<%@ page import="java.sql.DriverManager" %><%--
  Created by IntelliJ IDEA.
  User: 赁佳
  Date: 2018/5/17
  Time: 20:31
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>loginHandler</title>
</head>

<body>
<%
    String username = request.getParameter("username");
    String password = request.getParameter("password");

    if ("admin".equals(username) &&
            "123456".equals(password)) {
        //管理员登录
        out.write("登录成功！");

        boolean isLogin = true;

        session.setAttribute("isLogin", "true");
        response.sendRedirect("userList.jsp");

    } else {
        out.write("<p>用户名或密码错误。</p>");
    }
%>
</body>
</html>
